package com.example.book.web;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import com.example.book.repository.BookList;


@WebListener
public class BBStoreListener implements ServletContextListener {

  
    public void contextInitialized(ServletContextEvent sc) {
        
    	BookList bookList = new BookList();
    	ServletContext sc1 = sc.getServletContext();
    	sc1.setAttribute("bookList", bookList);
    	}

	
    public void contextDestroyed(ServletContextEvent sc) {
       
    }
	
}
